|
|
Hi all,
I have a smal problem and I hope you can help me .... I have been working with
Pov-Ray since version 1, never had any problems doing what I wanted to do, but
this one is doing my head in!
Why is the following not working? Pov-Ray throws a massive wobbler when I try to
run this code. It's probably something really stupid, but I can't see what the
problem is ....
#declare Image1 = function{pigment{image_map{jpeg "scene100.jpg"
interpolate 2 once } translate<-0.5,-0.5,0> scale 6}}
#declare Image2 = function{pigment{image_map{jpeg "sand1b.jpg"
interpolate 2 once }translate<-0.5,-0.5,0> scale 6}}
#declare Val1 = function{Image1(x,y,z).gray}
#declare Val2 = function{Image2(x,y,z).gray}
#declare OverlayRed =
pigment
{
#if(Val1 > Val2)
function{(1-Image1(x,y,z).red)*(1-Image2(x,y,z).red)/1}
colour_map{[0 rgb 0][1 rgb <2,0,0> ]}
#else
function{(Image1(x,y,z).red)*Image2(x,y,z).red)/1}
colour_map{[0 rgb 0][1 rgb <2,0,0>] }
#end
}
Everything works fine until I put the if-then-else thing in ...
I hope you can help. Thanks in advance!
Caz
Post a reply to this message
|
|